This version of Rayshade can generate not only images, but also Range Maps (also known as <#1232#>Z Buffers<#1232#>). A Range Map is a two dimensional image, where each pixel is the floating point distance from the image planeD.1to the object in the scene. This is especially useful for generating synthetic data sets for use in Computer Vision research, e.g. depth from stereo and shape from shading. Those techniques all attempt to reconstruct 3D information from 2D images, and having the actual Range Map available makes a quantitative analysis of the accuracy of reconstruction possible.
Range Maps are rendered for single framesD.2 from the same viewpoint used to generate images, with the same window size and resolution. To enable Range Map output, use the <#1236#>-z<#1236#> command line option:
The format of the file is specified by the filename suffix. Three formats are available:
integer X-coord ;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; integer Y-coord ;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; float DistanceSince each output line contains information on just one pixel, a blank line is inserted when the Y coordinate changes (i.e., when the data corresponds to a new scanline).
Why three formats? Heightfield Format is useful because it's very compact and can also be used as <#1248#>input<#1248#> to Rayshade; Text Format is easier to process in shell scripts; and Expanded Text Format is just right for quick displays using the <#1249#>GNUPlot<#1249#> display tool.